<?php
/**
 * CollectContentPlugin.php
 *
 * PHP Version 5.6
 *
 * @category PHP
 * @package  Telegram\Plugins
 * @author   ctwj <908504609@qq.com>
 * @license  MIT https://mit-license.org/
 * @link     MIT https://mit-license.org/
 * @date     2018-05-13 22:56:47
 * @modifyby ctwj
 */

namespace Telegram\Plugins;

use Symfony\Component\EventDispatcher\Event;

class CollectContentPlugin extends BasePlugin
{
    /**
     *  注册事件处理
     *
     * @param [Symfony\Component\EventDispatcher\EventDispatcher] $dispatcher dispatcher
     *
     * @return void
     */
    public static function registerListener($dispatcher)
    {
        $dispatcher->addListener(
            'collector.after.collect',
            ['Telegram\Plugins\CollectContentPlugin','onTest']
        );
    }

    public static function onTest(Event $e)
    {
        // echo 'plugin output' . PHP_EOL;
    }
}
